package IO流.properties;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Properties;

public class properties01 {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
        properties.load(new FileReader("src/main/java/IO流/properties/1.properties"));
//        System.out.println(properties.getProperty("name"));
//        System.out.println(properties.getProperty());

        properties.setProperty("type","string");
        properties.setProperty("age","12");
        properties.setProperty("name","小米");

        properties.store(new OutputStreamWriter(new FileOutputStream("src/main/java/IO流/properties/1.properties"), StandardCharsets.UTF_8),"");

    }
}
